package com.vue.admin.service.module.sys.dao.impl;

import com.vue.admin.service.common.mybatis.dao.BaseDAOImpl;
import com.vue.admin.service.common.mybatis.mapper.BaseDefMapper;
import com.vue.admin.service.module.sys.dao.UserDAO;
import com.vue.admin.service.module.sys.entity.UserEntity;
import com.vue.admin.service.module.sys.mapper.UserMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @program: vue-admin-service
 * @description: user 数据持久层接口实现类
 * @author: zhangyangyang
 * @create: 2020-04-03 13:35
 **/
@Component
public class UserDAOImpl extends BaseDAOImpl<UserEntity,Integer> implements UserDAO {

    @Resource
    private UserMapper userMapper;

    @Override
    public BaseDefMapper<UserEntity, Integer> getMapper() {
        return userMapper;
    }

    /**
     * 根据账号获得用户数据
     * @param account
     * @return
     */
    @Override
    public UserEntity findUserByAccount(String account) {
        return userMapper.findUserByAccount(account);
    }
}
